#ifndef __CK_CONNECTION_H__
#define __CK_CONNECTION_H__

#include "ckObject.h"
#include "zCore.h"

namespace ck
{
	class Command;

	class ZCORE_API Connection : public ckObject
	{
	protected:
		Connection() {}
		virtual ~Connection(){}
		
	public:
		virtual RESULTCODE	Open(const char* szHost, int port, const char* szDatabase, const char* szUser, const char* szPassword, const char* szDNS=NULL) = 0;
		virtual void		Close() = 0;
		virtual bool		IsOpen() = 0;
		
		virtual RESULTCODE	Execute(const char* szSQL) = 0;
		
		virtual Command*	CreateCommand() = 0;

		virtual ckDbType	GetDbType() = 0;

	};

}

#endif //__CK_CONNECTION_H__
